package com.byb.server.service;

import com.byb.server.domain.IllnessInfo;
import com.byb.server.service.dto.IllnessInfoDTO;
import com.byb.server.service.dto.IllnessInfoForExcelDTO;
import com.byb.server.service.dto.IllnessInfoTypeDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * Service Interface for managing IllnessInfo.
 */
public interface IllnessInfoService {

    /**
     * Save a illnessInfo.
     *
     * @param illnessInfoDTO the entity to save
     * @return the persisted entity
     */
    IllnessInfoDTO save(IllnessInfoDTO illnessInfoDTO);

    /**
     *  Get all the illnessInfos.
     *
     *  @param pageable the pagination information
     *  @return the list of entities
     */
    Page<IllnessInfoDTO> findAll(Pageable pageable);

    /**
     *  Get the "id" illnessInfo.
     *
     *  @param id the id of the entity
     *  @return the entity
     */
    IllnessInfoDTO findOne(Long id);

    /**
     *  Delete the "id" illnessInfo.
     *
     *  @param id the id of the entity
     */
    void delete(Long id);

    /**
     * Search for the illnessInfo corresponding to the query.
     *
     *  @param query the query of the search
     *
     *  @param pageable the pagination information
     *  @return the list of entities
     */
    Page<IllnessInfoDTO> search(String query, Pageable pageable);

    /**
     *  根据产品id 和疾病类型type 查询疾病信息
     * @param id
     * @return
     */
    IllnessInfoTypeDTO findAllByIdAndtypeId(Long id,Long type);

    boolean saveAll(List<IllnessInfoDTO> list);
}
